package com.stylefeng.guns.modular.owBackstageMgr.newsThemeMgr.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.modular.system.model.NewsTheme;
import com.stylefeng.guns.modular.system.dao.NewsThemeMapper;
import com.stylefeng.guns.modular.owBackstageMgr.newsThemeMgr.service.INewsThemeService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 官网文章/新闻的主题 服务实现类
 * </p>
 *
 * @author huangyuehong123
 * @since 2018-06-24
 */
@Service
public class NewsThemeServiceImpl extends ServiceImpl<NewsThemeMapper, NewsTheme> implements INewsThemeService {

    /**
     * 获取主题列表
     */
    @Override
    public List<Map<String, Object>> getNewsThemes(Page<NewsTheme> page, String name, String orderByField, boolean asc) {
        return this.baseMapper.getNewsThemes(page,name,orderByField,asc);
    }

    /**
     * 根据主题名称获取主题id
     */
    @Override
    public List<Map<String, Object>> getIdByName(String name) {
        return this.baseMapper.getIdByName(name);
    }
}
